package com.bawei.mall.product.service.impl;

import java.util.List;

import com.bawei.mall.product.domain.MallProductAttributeValuelist;
import com.bawei.mall.product.mapper.MallProductAttributeValuelistMapper;
import com.bawei.mall.product.service.IMallProductAttributeValuelistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * productService业务层处理
 *
 * @author bawei
 * @date 2024-07-03
 */
@Service
public class MallProductAttributeValuelistServiceImpl implements IMallProductAttributeValuelistService
{
    @Autowired
    private MallProductAttributeValuelistMapper mallProductAttributeValuelistMapper;

    /**
     * 查询product
     *
     * @param id product主键
     * @return product
     */
    @Override
    public MallProductAttributeValuelist selectMallProductAttributeValuelistById(Long id)
    {
        return mallProductAttributeValuelistMapper.selectMallProductAttributeValuelistById(id);
    }

    /**
     * 查询product列表
     *
     * @param mallProductAttributeValuelist product
     * @return product
     */
    @Override
    public List<MallProductAttributeValuelist> selectMallProductAttributeValuelistList(MallProductAttributeValuelist mallProductAttributeValuelist)
    {
        return mallProductAttributeValuelistMapper.selectMallProductAttributeValuelistList(mallProductAttributeValuelist);
    }

    /**
     * 新增product
     *
     * @param mallProductAttributeValuelist product
     * @return 结果
     */
    @Override
    public int insertMallProductAttributeValuelist(MallProductAttributeValuelist mallProductAttributeValuelist)
    {
        return mallProductAttributeValuelistMapper.insertMallProductAttributeValuelist(mallProductAttributeValuelist);
    }

    /**
     * 修改product
     *
     * @param mallProductAttributeValuelist product
     * @return 结果
     */
    @Override
    public int updateMallProductAttributeValuelist(MallProductAttributeValuelist mallProductAttributeValuelist)
    {
        return mallProductAttributeValuelistMapper.updateMallProductAttributeValuelist(mallProductAttributeValuelist);
    }

    /**
     * 批量删除product
     *
     * @param ids 需要删除的product主键
     * @return 结果
     */
    @Override
    public int deleteMallProductAttributeValuelistByIds(Long[] ids)
    {
        return mallProductAttributeValuelistMapper.deleteMallProductAttributeValuelistByIds(ids);
    }

    /**
     * 删除product信息
     *
     * @param id product主键
     * @return 结果
     */
    @Override
    public int deleteMallProductAttributeValuelistById(Long id)
    {
        return mallProductAttributeValuelistMapper.deleteMallProductAttributeValuelistById(id);
    }

    @Override
    public List<MallProductAttributeValuelist> selectListByProductId(Long productId) {
        return mallProductAttributeValuelistMapper.selectListByProductId(productId);
    }
}
